package com.ruoyi.peach.domain;

import java.util.Date;

/**
 * 
 * @TableName comment
 */
public class Comment {
    /**
     * 评论id
     */
    private Integer commentId;

    /**
     * 评论关联文章的id
     */
    private String articleId;

    /**
     * 内容
     */
    private String content;

    /**
     * 创建时间
     */
    private String creatTime;

    /**
     * 发表评论的id
     */
    private Integer userId;

    /**
     * 评论id
     */
    public Integer getCommentId() {
        return commentId;
    }

    /**
     * 评论id
     */
    public void setCommentId(Integer commentId) {
        this.commentId = commentId;
    }

    /**
     * 评论关联文章的id
     */
    public String getArticleId() {
        return articleId;
    }

    /**
     * 评论关联文章的id
     */
    public void setArticleId(String articleId) {
        this.articleId = articleId;
    }

    /**
     * 内容
     */
    public String getContent() {
        return content;
    }

    /**
     * 内容
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 创建时间
     */
    public String getCreatTime() {
        return creatTime;
    }

    /**
     * 创建时间
     */
    public void setCreatTime(String creatTime) {
        this.creatTime = creatTime;
    }

    /**
     * 发表评论的id
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 发表评论的id
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Comment other = (Comment) that;
        return (this.getCommentId() == null ? other.getCommentId() == null : this.getCommentId().equals(other.getCommentId()))
            && (this.getArticleId() == null ? other.getArticleId() == null : this.getArticleId().equals(other.getArticleId()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getCreatTime() == null ? other.getCreatTime() == null : this.getCreatTime().equals(other.getCreatTime()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCommentId() == null) ? 0 : getCommentId().hashCode());
        result = prime * result + ((getArticleId() == null) ? 0 : getArticleId().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getCreatTime() == null) ? 0 : getCreatTime().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", commentId=").append(commentId);
        sb.append(", articleId=").append(articleId);
        sb.append(", content=").append(content);
        sb.append(", creatTime=").append(creatTime);
        sb.append(", userId=").append(userId);
        sb.append("]");
        return sb.toString();
    }
}